-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
bevy_text::input
module with no undo
#20763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…pport text editing.
* `TextInputAction` -> `TextEdit` * `TextInputActions` -> `TextEdits`
…he cursor. If there is a selection, overwrites it instead.
…d automatically with the `TextInputValue `text
…he associated types and systems.
…ts to `InvalidEdit` and `TextChanged` respectively.
Co-authored-by: Tim <[email protected]>
Co-authored-by: Tim <[email protected]>
Co-authored-by: Tim <[email protected]>
Hey @tigregalis , I think the below addresses your feedback for this release, and the rest can be deferred for another PR?
I'm not super sure either, @ickshonpe @viridia can you chime in?
I'm not sure on this, we just call
Done
Added a comment to reflect this
Added a comment
I agree, I've separated the "submission" into the example, this could be merged back later, depending on how "forms" look |
I'm not sure what Early terminal displays did not support I-beam style cursors, and could only blink a fixed-width character on and off; when the cursor was at the end of the line, it would blink an empty space. In the original MacOS UI guidelines, and for many years after, the standard behavior for most GUIs was that when you selected the invisible line-break character at the end of a wrapped line, the selection highlight would be extended all the way to the right of the text input box, that is, the left edge of the rectangle would start just after the last character on the line, and the right edge of the rectangle would be the inner right padding of the containing box. However, some modern apps (like Chrome and VSCode) do not do this: instead, selecting the wrap character produces a cursor of some fixed width. When there is no wrap character (that is, either the cursor is at the end of the text, or it broke the line in the middle of a word) it shows a normal I-beam style cursor. |
Yeah, sounds good. I am a little hesitant about the password mask and the input filter being part of the same PR, but if those are the features people are looking for ultimately, maybe it doesn't make sense to hold them back for the sake of code history/evolution clarity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i am concerned about how much code is in the example. additionally, it seems this is just for 2d, can it be used in a ui in 3d or etc easily?
There's a lot in the example as this is the "low level" api - the follow-up PR has the "mid level" api for widgets, etc. Have a look at the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've played a bit with this PR and how to use it, and I think it introduces too many things at once, and some that doesn't interact well together.
I would prefer a simpler PR that would introduce a component that holds a cosmic buffer, and how to interact with it. Making it smaller would also improve the code organisation.
I don't think this should be merged in this state.
@mockersf Could you expand on this point? |
I've taken the time to split up |
Objective
bevy_text::input
module #20336 without undo/redo (see Temporarily upstream undo_2 #20489 to upstream theundo_2
library)Testing